package com.zry.traced.utils

import com.zry.traced.R
import com.zry.traced.been.BasicBean
import com.zry.traced.been.HomePageBean


/**
 * Created by zry on 2017/12/16.
 */
class HomePageList {
    fun getHomeList(basicList: MutableList<BasicBean>): MutableList<BasicBean> {
        basicList.forEach {
            when {
                it.BasicCode == "pda01" -> it.BasicImg = R.mipmap.home_page_img01
                it.BasicCode == "pda02" -> it.BasicImg = R.mipmap.home_page_img02
                it.BasicCode == "pda03" -> it.BasicImg = R.mipmap.home_page_img03
                it.BasicCode == "pda04" -> it.BasicImg = R.mipmap.home_page_img04
                it.BasicCode == "pda05" -> it.BasicImg = R.mipmap.home_page_img05
                it.BasicCode == "pda06" -> it.BasicImg = R.mipmap.home_page_img06
            }
        }
        return basicList
    }

    fun getComplementCodeList(): MutableList<HomePageBean> {
        val homePageBeanList: MutableList<HomePageBean> = mutableListOf()
        val homePageBean = HomePageBean(0, R.mipmap.home_page_img10, "补码入箱")
        homePageBeanList.add(homePageBean)
        val homePageBean1 = HomePageBean(1, R.mipmap.home_page_img11, "拆码出箱")
        homePageBeanList.add(homePageBean1)
        return homePageBeanList
    }

    fun getOperationRecord(): MutableList<HomePageBean> {
        val homePageBeanList: MutableList<HomePageBean> = mutableListOf()
        val homePageBean = HomePageBean(0, R.mipmap.home_page_img12, "入库记录")
        homePageBeanList.add(homePageBean)
        val homePageBean2 = HomePageBean(1, R.mipmap.home_page_img13, "出库记录")
        homePageBeanList.add(homePageBean2)
        val homePageBean3 = HomePageBean(2, R.mipmap.home_page_img14, "打包记录")
        homePageBeanList.add(homePageBean3)
        val homePageBean4 = HomePageBean(3, R.mipmap.home_page_img15, "补码记录")
        homePageBeanList.add(homePageBean4)
        val homePageBean5 = HomePageBean(4, R.mipmap.home_page_img16, "拆码记录")
        homePageBeanList.add(homePageBean5)

        return homePageBeanList
    }

    fun getLocalData(): MutableList<HomePageBean> {
        val homePageBeanList: MutableList<HomePageBean> = mutableListOf()
        val homePageBean = HomePageBean(0, R.mipmap.home_page_img17, "未上传入库记录")
        homePageBeanList.add(homePageBean)
        val homePageBean2 = HomePageBean(1, R.mipmap.home_page_img18, "未上传出库记录")
        homePageBeanList.add(homePageBean2)
        val homePageBean3 = HomePageBean(3, R.mipmap.home_page_img19, "未上传打包记录")
        homePageBeanList.add(homePageBean3)
        return homePageBeanList
    }
}


